% Figure 5
% Total notional amount of all credit card ABS outstanding
% This figure plots the total notional amount of all credit card ABS
% outstanding.


% Source: https://www.sifma.org/resources/research/us-asset-backed-securities-statistics/
% Security:	US Asset Backed Securities
% Series:	Outstanding
% Units:	$ Billions
% Source:	Bloomberg, Dealogic, Thomson Reuters, prospectus filings, Fitch Ratings, Moody's, S&P, SIFMA
% Note:	Auto (prime, near-prime, subprime) loans and leases; auto dealer floorplans; RV; motorcycle; fleet lease
% 	Credit cards, resecuritizations of credit card securities
% 	Equipment, resecuritizations of equipment securities. Includes both small and large ticket. As of 2013:Q1, truck leasing has been moved into equipment and totals subsequently reflect this change; as of 2014:Q4, large ticket transportation deals (aircraft, container, railcar) have  been moved into this category.
% 	Student loans, public and private. Due to the nature of this particular submarket, student loan ABS outstandings are an undercount of true totals. Deals may be bucketed within municipal or ABS categories based on the deal structure and issuer choice of market. 
% 	All tranches of CDOs denominated in USD, regardless of collateral source. Outstanding figures include structured finance CDOs, trust preferred CDOs, collateralized bond obligations, collateralized loan obligations, and collateralized fund obligations.
% 	Agency securitizations of ABS securities are included in outstanding totals (e.g., Resolution Trust Corporation, Sallie Mae pre-privatization, Farm Credit, etc) with the exceptions of Ginnie Mae, Fannie Mae, and Freddie Mac.
% 	All subcategories are subject to revision.


Year = [2000; 2001; 2002; 2003; 2004; 2005; 2006; 2007; 2008; 2009; 2010; 2011; 2012; 2013; 2014; 2015; 2016; 2017; 2018; 2019; 2020];
CardOutstanding = [240.1; 268.2; 294.5; 304.7; 298.6; 287.3; 291.6; 324.8; 316.0; 300.7; 217.3; 164.3; 128.2; 124.5; 136.5; 128.6; 130.5; 128.9; 123.8; 100.7; 67.5];
Date = repmat(datetime("1-Jan-2000"),length(Year ),1);
for i=1:length(Year)
   Date(i) = datetime(Year(i),12,31); 
end



fig = figure('NumberTitle', 'Off', 'Name', 'Figure 1');
letterWidth_inches = 8.5;
letterHeight_inches = 11.0;
letterWidth_cm = 21.59;
letterHeight_cm = 27.94;
letterWidth_pixel = 2250; 
letterHeight_pixel = 3300; 

paperWidth  = letterWidth_cm;
paperHeight = letterHeight_cm;
leftMargin = 1;
bottomMargin  = 1;
figOrientation = 'portrait';
figWidth = 18; 
figHeight = 12;

set(fig,'Units','centimeters');
set(fig,'Position',[0 0 figWidth figHeight]);
movegui(fig,'center')

set(fig,'PaperUnits', 'centimeters');
set(fig,'PaperSize', [paperWidth paperHeight]);
set(fig,'PaperPosition',[leftMargin bottomMargin figWidth figHeight]);
set(fig,'PaperSize', [figWidth figHeight]);
set(fig,'PaperPosition',[0 0 figWidth figHeight]);
set(fig,'PaperOrientation',figOrientation);
set(fig,'InvertHardcopy','on');


plot_1 = plot(datenum(Date),CardOutstanding);
set(plot_1, 'LineStyle', '-', 'Color', 'b' , 'LineWidth', 1.00);
ax = gca;
ax.PlotBoxAspectRatio = [1,0.35,0.35];
ylim([0 350])
minX = min(datenum(Date));
maxX = max(datenum(Date));
xlim([minX-0.025 maxX+0.025])
dateaxis
set(gca,'XTick',datenum([...
    'Jan-1-2002'; ...
    'Jan-1-2006'; ...
    'Jan-1-2010'; ...
    'Jan-1-2014'; ...
    'Jan-1-2018']));
set(gca,'XTickLabel',[...
    '2002';...
    '2006';...
    '2010';...
    '2014';...
    '2018'])
ylabel('Billions of Dollars')
grid 'on';
box 'on';
set(gcf, 'Color', [1,1,1]);


